//版本一
//异步函数嵌套多了，会有回调问题
const traffic = document.getElementById('traffic');

(function reset() {
    traffic.className = 's1';
    setTimeout(function () {
        traffic.className = 's2';
        setTimeout(function () {
            traffic.className = 's3';
            setTimeout(reset, 500)
        }, 500)
    }, 500)
})();